import request from '@/utils/request'

export function bindUserRoles(data) {
  return request({
    url: 'api/Role/BindUserRole',
    method: 'post',
    data
  })
}

export function getAllRoles(data) {
  return request({
    url: 'api/Role/GetAllRole',
    method: 'post',
    data
  })
}

export function queryRoleAuthByRoleId(id) {
  return request({
    url: 'api/Role/GetRoleAuth',
    method: 'get',
    params: {
      roleId: id
    }
  });
}

export function updRoleAuthByRoleId(data) {
  return request({
    url: 'api/Role/UpdRoleAuth',
    method: 'post',
    data
  });
}
